<div class="propertyTypes view">
<h2><?php  __('Property Type');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Property Type Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['property_type_id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Building'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($propertyType['Building']['building_name'], array('controller' => 'buildings', 'action' => 'view', $propertyType['Building']['building_id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Property Type Order'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['property_type_order']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Property Type Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['property_type_name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Description'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['description']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Expense Amount'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['expense_amount']; ?>
			&nbsp;
		</dd>
                <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Special Expense Amount'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['special_expense_amount']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Coefficient'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['coefficient']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('End Date'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['end_date']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created By'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['created_by']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['created']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Updated By'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['updated_by']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Updated'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $propertyType['PropertyType']['updated']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
            <?php if (!$propertyType['PropertyType']['end_date']) { ?>
		<li><?php echo $this->Html->link(__('Edit Property Type', true), array('action' => 'edit', $propertyType['PropertyType']['property_type_id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Delete Property Type', true), array('action' => 'delete', $propertyType['PropertyType']['property_type_id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $propertyType['PropertyType']['property_type_id'])); ?> </li>
            <? } ?>
		<li><?php echo $this->Html->link(__('List Property Types', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Property Type', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Buildings', true), array('controller' => 'buildings', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('List Expenditure Distributions', true), array('controller' => 'expenditure_distributions', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('List Properties', true), array('controller' => 'properties', 'action' => 'index')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Expenditure Distributions');?></h3>
	<?php if (!empty($propertyType['ExpenditureDistribution'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Expenditure Distribution Id'); ?></th>
		<th><?php __('Property Type Id'); ?></th>
		<th><?php __('Expenditure Type Id'); ?></th>
		<th><?php __('Coefficient'); ?></th>
		<th><?php __('Created By'); ?></th>
		<th><?php __('Created'); ?></th>
		<th><?php __('Updated By'); ?></th>
		<th><?php __('Updated'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($propertyType['ExpenditureDistribution'] as $expenditureDistribution):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $expenditureDistribution['expenditure_distribution_id'];?></td>
			<td><?php echo $expenditureDistribution['property_type_id'];?></td>
			<td><?php echo $expenditureDistribution['expenditure_type_id'];?></td>
			<td><?php echo $expenditureDistribution['coefficient'];?></td>
			<td><?php echo $expenditureDistribution['created_by'];?></td>
			<td><?php echo $expenditureDistribution['created'];?></td>
			<td><?php echo $expenditureDistribution['updated_by'];?></td>
			<td><?php echo $expenditureDistribution['updated'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'expenditure_distributions', 'action' => 'view', $expenditureDistribution['expenditure_distribution_id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'expenditure_distributions', 'action' => 'edit', $expenditureDistribution['expenditure_distribution_id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'expenditure_distributions', 'action' => 'delete', $expenditureDistribution['expenditure_distribution_id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $expenditureDistribution['expenditure_distribution_id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Expenditure Distribution', true), array('controller' => 'expenditure_distributions', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Properties');?></h3>
	<?php if (!empty($propertyType['Property'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Property Id'); ?></th>
		<th><?php __('Building Id'); ?></th>
		<th><?php __('Property Type Id'); ?></th>
		<th><?php __('Floor'); ?></th>
		<th><?php __('Flat'); ?></th>
		<th><?php __('Dividend'); ?></th>
		<th><?php __('Owner Id'); ?></th>
		<th><?php __('Owner Representative Id'); ?></th>
		<th><?php __('Tenant Id'); ?></th>
		<th><?php __('Tenant Representative Id'); ?></th>
		<th><?php __('End Date'); ?></th>
		<th><?php __('Created By'); ?></th>
		<th><?php __('Created'); ?></th>
		<th><?php __('Updated By'); ?></th>
		<th><?php __('Updated'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($propertyType['Property'] as $property):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $property['property_id'];?></td>
			<td><?php echo $property['building_id'];?></td>
			<td><?php echo $property['property_type_id'];?></td>
			<td><?php echo $property['floor'];?></td>
			<td><?php echo $property['flat'];?></td>
			<td><?php echo $property['dividend'];?></td>
			<td><?php echo $property['owner_id'];?></td>
			<td><?php echo $property['owner_representative_id'];?></td>
			<td><?php echo $property['tenant_id'];?></td>
			<td><?php echo $property['tenant_representative_id'];?></td>
			<td><?php echo $property['end_date'];?></td>
			<td><?php echo $property['created_by'];?></td>
			<td><?php echo $property['created'];?></td>
			<td><?php echo $property['updated_by'];?></td>
			<td><?php echo $property['updated'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'properties', 'action' => 'view', $property['property_id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'properties', 'action' => 'edit', $property['property_id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'properties', 'action' => 'delete', $property['property_id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $property['property_id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Property', true), array('controller' => 'properties', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
